package com.zc.manager.device.request;

import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * 设备消息消息计数请求类
 * 用于封装设备消息统计请求的相关参数
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class DeviceGatewayMessageCountRequest extends DeviceMetricsCountRequest{

    public static final String RECEIVED_MESSAGE = "received_message";
    public static final String SENT_MESSAGE = "sent_message";

    // 方向（received_message：接收消息，sent_message：发送消息）
    @NotNull(message = "参数direction为空")
    @Pattern(regexp = "received_message|sent_message", message = "参数direction必须是received_message或者sent_message")
    private String direction;
}

